<extend name="Public/content" />
<style type="text/css">
 body{ background: #fff;}
</style>
<block name="body">
 <include file="Public:artdialog" />

    <div class="row">
        <div class="col-md-12">
            <div class="block-web">
                <div class="header"> 
                    <h3 class="content-header">操作提醒</h3>
                </div>
                <div class="porlets-content">
                  
                    <div class="system-message msg-success layout1180">
                        <table>
                            <tr>
                                <td class="td1">
                                    <img src="__PUBLIC__/admin/images/success.jpg" />
                                </td>
                                <td class="td2">
                                    <p class="success"><?php echo($message); ?></p>
                                    <p class="detail"></p>
                                    <p class="jump">
                                        <b id="wait"><?php echo($waitSecond); ?></b> 秒后页面将自动跳转
                                    </p>
                                    <div class="opbtng">
                                        <a id="btn-now" href="<?php echo($jumpUrl); ?>">立即跳转</a>
                                        <button id="btn-stop" type="button" onclick="stop()">停止跳转</button>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>


                </div> 
            </div> 
        </div> 
    </div>


 
    <script type="text/javascript">
        (function(){
            var wait = document.getElementById('wait'),href = document.getElementById('btn-now').href;
            var interval = setInterval(function(){
                var time = --wait.innerHTML;
                if(time <= 0) {
                    location.href = href;
                    clearInterval(interval);
                };
            }, 1000);
            window.stop = function (){
                console.log(111);
                clearInterval(interval);
            }
        })();
    </script>

</block>
